<?php
/**
 * TomatoCMS
 * 
 * LICENSE
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-2.0.txt
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@tomatocms.com so we can send you a copy immediately.
 * 
 * @copyright	Copyright (c) 2009-2010 TIG Corporation (http://www.tig.vn)
 * @license		http://www.gnu.org/licenses/gpl-2.0.txt GNU GENERAL PUBLIC LICENSE Version 2
 * @version 	$Id: Promotion.php 4618 2010-08-15 02:46:13Z jam-gate.vn $
 * @since		2.0.5
 */

interface Promotion_Models_Interface_Promotion
{
	/**
	 * Get promotion by given Id
	 * 
	 * @param int $id Id of promotion
	 * @return Promotion_Models_Promotion
	 */
	public function getById($id);
	
	/**
	 * Add new promotion
	 * 
	 * @param Promotion_Models_Promotion $promotion
	 * @return int
	 */
	public function add($promotion);
	
	/**
	 * Update promotion
	 * 
	 * @param Promotion_Models_Promotion $promotion
	 * @return void
	 */
	public function update($promotion);
	
	/**
	 * Delete promotion
	 * 
	 * @param Promotion_Models_Promotion $promotion
	 * @return void
	 */
	public function delete($promotion);
	
	/**
	 * Get Next Id
	 * 
	 * @return string
	 */
	public function getNextId();
	
	public function find($count,$offset,$exp=null);
	
	public function count($exp);
}
